A scheduler in a computing environment allows for a plurality of processes to be run in a predetermined order and/or concurrently. The scheduler may determine a sequence at which the processes run so that each process is allowed access to a processor at a particular time. In a first use, the scheduler may allow for a single process to complete prior to any other process, such as when the scheduler includes priority data regarding the various processes to be run. In a second use, the scheduler may allow for a process to run for a predetermined amount of time at which point a further process is allowed to run for a further predetermined amount of time.
In the case where multiple processes are run for predetermined amounts of time, the scheduler includes context switch times between each context switch. That is, there is a time set aside so that the process utilizing the processor is allowed time to release the processor and the further process is allowed time to capture the processor. A conventional scheduler makes an assumption that the context switch time is negligible, in particular when compared to the predetermined time the process is allowed to capture the processor. However, this is an issue if the system must guarantee a certain amount of time to its processes or if processes may only access the processor at specific blocks of time.
The conventional scheduler also attempts to utilize all means to optimize the scheduling functionality. For example, a context switch may be optimized to save and restore the strict minimal number of the computer registers. For this reason, the context switch is regularly assumed negligible. In another example, computers have less deterministic behavior since instructions may be executed out of order, thereby causing a context switch to be non-constant in time. However, the optimization often leads to the context switch time being stolen from the process's execution time or included such that it can introduce drift in scheduling periodicity. Accordingly, with time-sharing algorithms, the scheduler would therefore not be able to accurately predict when the next time slice starts after switching contexts, thereby breaking the time slice's periodicity and forcing time slices to drift. The drift experienced from the optimization of the scheduling functionality inevitably affects the periodicity of the scheduler, with the drift accumulating over time and having a significant impact on the periodicity.